package com.dhcc.bpm.modules.gateway.service;

import com.dhcc.bpm.modules.gateway.entity.GatewayRoute;
import com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * @ClassName IGatewayRouteService
 * @Description 网关路由表 服务类
 * @Author YaoZC
 * @Date 2019/11/26 16:08
 * @Version 1.0
 * @Copyright: 2019 东华软件 . All rights reserved.
 */
public interface IGatewayRouteService extends BaseService<GatewayRoute> {

	/**
	 * @Description 自定义分页
	 * @Date 2019/11/26 16:08
	 * @param page
	 * @param gatewayRoute
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	IPage<GatewayRouteVO> selectGatewayRoutePage(IPage<GatewayRouteVO> page, GatewayRouteVO gatewayRoute);/**
	 * @Description 根据基础产品查路由列表和根据api查路由列表
	 * @Date 2020/12/26 16:08
	 * @param page
	 * @param gatewayRoute
	 * @return com.baomidou.mybatisplus.core.metadata.IPage<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	IPage<GatewayRouteVO> listGatewayRoute(IPage<GatewayRouteVO> page, GatewayRouteVO gatewayRoute);
	/**
	 * @Description 根据网关id获取网关路由信息
	 * @Date 2019/11/26 16:08
	 * @param id
	 * @return java.util.List<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	List<GatewayRouteVO> getByGatewayId(Long id);
	/**
	 * @Description 根据网关id获取网关路由信息
	 * @Date 2019/11/26 16:08
	 * @param apiId
	 * @return java.util.List<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	List<GatewayRouteVO> getByApiId(String apiId);
	/**
	 * @Description 根据后端服务id获取网关路由信息
	 * @Date 2019/11/26 16:08
	 * @param backServiceId
	 * @return java.util.List<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	List<GatewayRouteVO> getByBaceServiceId(Long backServiceId);

	/**
	 * @Description 根据网关id获取网关路由信息
	 * @Date 2019/11/26 16:08
	 * @param id,env
	 * @return java.util.List<com.dhcc.bpm.modules.gateway.vo.GatewayRouteVO>
	 **/
	GatewayRouteVO getGatewayByApiId(String id, String env);

	int updateBackServiceIdByApiId(GatewayRouteVO gatewayRoute);

	List<GatewayRouteVO> findByServerId(Long externalcallId);

	List<GatewayRouteVO> queryOrder(GatewayRoute gatewayRoute);

	Integer queryMaxOrder(GatewayRoute gatewayRoute);

	List<GatewayRoute> findOrderChild(GatewayRoute gatewayRoute);
}
